package com.wcs.exam;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.ConfigurableEnvironment;
import org.springframework.scheduling.annotation.EnableScheduling;

/**
 * @author wcs
 */
@EnableScheduling
@Slf4j
@SpringBootApplication
public class ApplicationMain {

    public static void main(String[] args) {
        ConfigurableApplicationContext content = SpringApplication.run(ApplicationMain.class, args);
        ConfigurableEnvironment env = content.getEnvironment();
        String port = env.getProperty("server.port");
        log.info("启动成功，访问地址：http://localhost:{}", port);
    }

}
